<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>利用精灵图拼出自己名字</title>
    <style>
        span {
            display: inline-block;
            background: url(images/abcd.jpg) no-repeat;
        }
        .p {
            width: 100px;
            height: 112px;
            background-position: -493px -276px;
        }
        .i {
            width: 60px;
            height: 108px;
            background-position: -327px -142px;
        }
        .n {
            width: 113px;
            height: 115px;
            background-position: -255px -275px;
        }
        .k {
            width: 105px;
            height: 114px;
            background-position: -495px -142px;
        }
    </style>
</head>
<body>
    <span class="p">p</span>
    <span class="i">i</span>
    <span class="n">n</span>
    <span class="k">k</span>
</body>
</html>
